package org.jtzc.springaimcpservermvc.controller;

import jakarta.annotation.Resource;
import org.jtzc.springaimcpservermvc.SpringAiMcpServerMvcApplication;
import org.springframework.ai.tool.ToolCallback;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wu chuang
 * @description
 */
@RestController
public class ToolController {

    @Resource
    ToolCallback toolCallback;
    @GetMapping("init")
    public String initTools(String toolName) {
//        SpringAiMcpServerMvcApplication.TextInput input = new SpringAiMcpServerMvcApplication.TextInput(toolName);
//        String tool = input.input();
//        System.out.println(tool+"==========================");
//        Object result = toolCallback.call(tool);
        return "ok";
    }

}
